// -----------------------------
// Author: 		Dhaenens Gert 
// Creation: 	12/4/2014 2:35:52 PM				
// -----------------------------

#ifndef _IRenderTarget2D_h
#define _IRenderTarget2D_h

#include "DxCommon.h"

namespace DxLib
{

	class IRenderDevice;
	class IBrush;
	class ITextFormat;

	class DXLIB IRenderTarget2D
	{
	public:
		// Create the 2D Render Target
		static IRenderTarget2D*	Create(IRenderDevice* lpDevice, UInt32 uWidth, UInt32 uHeight);
		// Release the Interface
		virtual void	Release() = 0;

		// Begin a Draw Call
		virtual void	BeginDraw() = 0;
		// End a Draw Call
		virtual void	EndDraw() = 0;

		// Clear the Target
		virtual void	Clear(Float r, Float g, Float b, Float a) = 0;

		// Draw a String
		virtual void	DrawString(Float x, Float y, const TChar* lpStr, SizeT strLen, ITextFormat* lpTextFormat) const = 0;
		// Draw a String
		virtual void	DrawString(UInt32 x, UInt32 y, const TChar* lpStr, SizeT strLen, ITextFormat* lpTextFormat) const = 0;
		// Draw a String
		virtual void	DrawString(const Vector2F& p, const TChar* lpStr, SizeT strLen, ITextFormat* lpTextFormat) const = 0;
		// Draw a String
		virtual void	DrawString(const Vector2U& p, const TChar* lpStr, SizeT strLen, ITextFormat* lpTextFormat) const = 0;
		// Draw a String
		virtual void	DrawString(const RectF& layoutRect, const TChar* lpStr, SizeT strLen, ITextFormat* lpTextFormat) const = 0;
		// Draw a String
		virtual void	DrawString(const RectU& layoutRect, const TChar* lpStr, SizeT strLen, ITextFormat* lpTextFormat) const = 0;

		// Draw an Ellipse
		virtual void	DrawEllipse(Float x, Float y, Float radiusX, Float radiusY, Float strokeWidth = 1.0f) const = 0;
		// Draw an Ellipse
		virtual void	DrawEllipse(const Vector2F& center, Float radiusX, Float radiusY, Float strokeWidth = 1.0f) const = 0;
		// Draw an Ellipse
		virtual void	DrawEllipse(const Vector2U& center, UInt32 radiusX, UInt32 radiusY, Float strokeWidth = 1.0f) const = 0;
		// Draw an Ellipse
		virtual void	DrawEllipse(const EllipseF& ellipse, Float strokeWidth = 1.0f) const = 0;
		// Draw an Ellipse
		virtual void	DrawEllipse(const EllipseU& ellipse, Float strokeWidth = 1.0f) const = 0;
		// Draw a Rectangle
		virtual void	DrawRectangle(Float x, Float y, Float width, Float height, Float strokeWidth = 1.0f) const = 0;
		// Draw a Rectangle
		virtual void	DrawRectangle(const Vector2F& leftTop, Float width, Float height, Float strokeWidth = 1.0f) const = 0;
		// Draw a Rectangle
		virtual void	DrawRectangle(const Vector2U& leftTop, UInt32 width, UInt32 height, Float strokeWidth = 1.0f) const = 0;
		// Draw a Rectangle
		virtual void	DrawRectangle(const RectF& rect, Float strokeWidth = 1.0f) const = 0;
		// Draw a Rectangle
		virtual void	DrawRectangle(const RectU& rect, Float strokeWidth = 1.0f) const = 0;

		// Fill an Ellipse
		virtual void	FillEllipse(Float x, Float y, Float radiusX, Float radiusY) const = 0;
		// Fill an Ellipse
		virtual void	FillEllipse(const Vector2F& center, Float radiusX, Float radiusY) const = 0;
		// Fill an Ellipse
		virtual void	FillEllipse(const Vector2U& center, UInt32 radiusX, UInt32 radiusY) const = 0;
		// Fill an Ellipse
		virtual void	FillEllipse(const EllipseF& ellipse) const = 0;
		// Fill an Ellipse
		virtual void	FillEllipse(const EllipseU& ellipse) const = 0;
		// Fill a Rectangle
		virtual void	FillRectangle(Float x, Float y, Float width, Float height) const = 0;
		// Fill a Rectangle
		virtual void	FillRectangle(const Vector2F& leftTop, Float width, Float height) const = 0;
		// Fill a Rectangle
		virtual void	FillRectangle(const Vector2U& leftTop, UInt32 width, UInt32 height) const = 0;
		// Fill a Rectangle
		virtual void	FillRectangle(const RectF& rect) const = 0;
		// Fill a Rectangle
		virtual void	FillRectangle(const RectU& rect) const = 0;

		// Get the Render Target Brush
		virtual IBrush*			GetBrush() const = 0;
		// Get the Device Associated with this Target
		virtual IRenderDevice*	GetDevice() const = 0;

	};

}

#endif